home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
pibt40s1.arc
/
GETCOMAN.MOD
< prev
next >
Wrap
Text File
|
1987-08-12
|
4KB
|
83 lines
(*----------------------------------------------------------------------*)
(* Get_Command_Line_Parameters --- Get command line parameters *)
(*----------------------------------------------------------------------*)
PROCEDURE Get_Command_Line_Parameters;
(*----------------------------------------------------------------------*)
(* *)
(* Procedure: Get_Command_Line_Parameters *)
(* *)
(* Purpose: Gets command line parameters for PibTerm *)
(* *)
(* Calling Sequence: *)
(* *)
(* Get_Command_Line_Parameters; *)
(* *)
(*----------------------------------------------------------------------*)
VAR
S : AnyStr;
S2: AnyStr;
I : INTEGER;
(*----------------------------------------------------------------------*)
(* Fix_Name --- Fix up parameter file name *)
(*----------------------------------------------------------------------*)
FUNCTION Fix_Name( FName : AnyStr; FType : AnyStr ) : AnyStr;
BEGIN (* Fix_Name *)
IF ( POS( '.' , FName ) = 0 ) THEN
FName := FName + '.' + FType;
Fix_Name := UpperCase( FName );
END (* Fix_Parameter_File_Name *);
(*----------------------------------------------------------------------*)
BEGIN (* Get_Command_Line_Parameters *)
(* Set defaults *)
Command_Script_File_Name := 'PIBTERM.SCR';
Command_Config_File_Name := 'PIBTERM.CNF';
Command_Dialing_File_Name := 'PIBTERM.FON';
Command_Prefix_File_Name := 'PIBTERM.PRE';
Command_Translate_File_Name:= 'PIBTERM.TRA';
Command_Function_Key_Name := 'PIBTERM.FNC';
Command_Log_File_Name := 'PIBTERM.LOG';
Command_Debug_Mode := FALSE;
Use_EMM_For_Overlays := FALSE;
(* Loop over command line params *)
FOR I := 1 TO ParamCount DO
BEGIN
S := ParamStr( I );
IF ( S[1] = '/' ) THEN
BEGIN
IF ( S[3] = '=' ) THEN
S2 := SubStr( S, 4, LENGTH( S ) - 3 )
ELSE
S2[0] := #0;
CASE UpCase( S[2] ) OF
'S': Command_Script_File_Name := Fix_Name( S2 , 'SCR' );
'C': Command_Config_File_Name := Fix_Name( S2 , 'CNF' );
'D': Command_Dialing_File_Name := Fix_Name( S2 , 'FON' );
'K': Command_Function_Key_Name := Fix_Name( S2 , 'FNC' );
'L': Command_Log_File_Name := Fix_Name( S2 , 'LOG' );
'P': Command_Prefix_File_Name := Fix_Name( S2 , 'PRE' );
'T': Command_Translate_File_Name := Fix_Name( S2 , 'TRA' );
'0': Command_Debug_Mode := TRUE;
'X': Use_EMM_For_Overlays := TRUE;
ELSE;
END (* CASE *);
END
ELSE
Command_Script_File_Name := Fix_Name( S , 'SCR' );
END;
END (* Get_Command_Line_Parameters *);